#-*- coding: utf-8 -*-
'''
users.py
'''
from apps import app
from apps.models import User
from apps import db
from apps import _nlib

@app.route('/users')
def users():
    u = User(_nlib.nDateTime(), _nlib.nDateTime())
    db.session.add(u)
    db.session.commit()
    return 'users'


@app.teardown_request
def shutdown_session(exception=None):
    print('teardown_request')
    db.session.remove()


@app.before_request
def before_request():
    print('before_request')
